<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
    <head>
        <th:block th:include="include :: header('新增流程类别明细')"/>
    </head>
    <body class="white-bg">
        <div class="wrapper wrapper-content animated fadeInRight ibox-content">
            <form class="form-horizontal m" id="form-info-add">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">类别明细名称：</label>
                    <div class="col-sm-8">
                        <input name="name" class="form-control" type="text" autocomplete="off" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">流程类型：</label>
                    <div class="col-sm-8">
                        <select name="flowCategory.id" id="flowCategoryName" class="form-control" required>
                            <option value="">-请选择-</option>
                            <option th:each="flowCategory : ${flowCategoryList}" th:text="${flowCategory.name}" th:value="${flowCategory.id}"></option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">是否包含休息日：</label>
                    <div class="col-sm-8">
                        <div class="radio-box" th:each="dict : ${@dict.getType('sys_yes_no')}">
                            <input class="isHolidayRadio" type="radio" th:id="${'isHoliday_' + dict.dictCode}" name="isHoliday" th:value="${dict.dictValue}" th:checked="${dict.default}" autocomplete="off" required>
                            <label th:for="${'isHoliday_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                            <div class="black">
                                <label th:if="${dict.dictValue == 'Y'}">请假时段中包含员工的休息日,会计入请假天数</label>
                                <label th:if="${dict.dictValue == 'N'}">请假时段中不包含员工的休息日,不会计入请假天数</label>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <th:block th:include="include :: footer"/>
        <script th:inline="javascript">
            var prefix = ctx + "oa/info"
            $("#form-info-add").validate({
                focusCleanup: true
            });

            function submitHandler() {
                if ($.validate.form()) {
                    $.operate.save(prefix + "/add", $('#form-info-add').serialize());
                }
            }
        </script>
    </body>
</html>